package org.jflame.commons.convert.mutual;

import org.jflame.commons.util.DateHelper;

import java.time.LocalDate;
import java.util.Date;

public class DateAndLocalDateConverter implements MutualConverter<Date,LocalDate> {

    @Override
    public LocalDate convert(Date source) {
        return DateHelper.toLocalDate(source);
    }

    @Override
    public Date inverseConvert(LocalDate source) {
        return DateHelper.fromLocalDate(source);
    }

}
